﻿<Controls:GlassWindow x:Class="VitrineInterativa.PrincipalGlass" 
                      xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" 
                      xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" 
                      xmlns:Controls="clr-namespace:FluidKit.Controls;assembly=FluidKit" 
                      xmlns:appControl="clr-namespace:VitrineInterativa"
                      Foreground="LightGray"  FontFamily="Calibri"
                      mc:Ignorable="d" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
                      xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" Width="628" Height="290" ResizeMode="NoResize">
    <Control.Resources>
        <LinearGradientBrush x:Key="CheckedBlue" StartPoint="0,0" EndPoint="0,1">
            <GradientStop Color="#FF285AB3" Offset="0" />
            <GradientStop Color="#FF4184EC" Offset="0.5" />
            <GradientStop Color="#FF558BED" Offset="0.5" />
            <GradientStop Color="#FF7DACF0" Offset="1" />
        </LinearGradientBrush>
        <LinearGradientBrush x:Key="CheckedOrange" StartPoint="0,0" EndPoint="0,1">
            <GradientStop Color="#FFCA6A13" Offset="0" />
            <GradientStop Color="#FFF67D0C" Offset="0.2" />
            <GradientStop Color="#FFFE7F0C" Offset="0.2" />
            <GradientStop Color="#FFFA8E12" Offset="0.5" />
            <GradientStop Color="#FFFF981D" Offset="0.5" />
            <GradientStop Color="#FFFCBC5A" Offset="1" />
        </LinearGradientBrush>
        <SolidColorBrush x:Key="CheckedOrangeBorder" Color="#FF8E4A1B" />
        <SolidColorBrush x:Key="CheckedBlueBorder" Color="#FF143874" />
        <Style x:Key="OrangeSwitchStyle" TargetType="{x:Type CheckBox}">
            <Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.WindowTextBrushKey}}" />
            <Setter Property="Background" Value="{DynamicResource {x:Static SystemColors.WindowBrushKey}}" />
            <Setter Property="Template">
                <Setter.Value>
                    <ControlTemplate TargetType="{x:Type CheckBox}">
                        <ControlTemplate.Resources>
                            <Storyboard x:Key="OnChecking">
                                <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="slider" Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[3].(TranslateTransform.X)">
                                    <SplineDoubleKeyFrame KeyTime="00:00:00.1000000" Value="53" />
                                </DoubleAnimationUsingKeyFrames>
                            </Storyboard>
                            <Storyboard x:Key="OnUnchecking">
                                <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="slider" Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[3].(TranslateTransform.X)">
                                    <SplineDoubleKeyFrame KeyTime="00:00:00.1000000" Value="0" />
                                </DoubleAnimationUsingKeyFrames>
                            </Storyboard>
                        </ControlTemplate.Resources>
                        <DockPanel x:Name="dockPanel">
                            <ContentPresenter SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" Content="{TemplateBinding Content}" ContentStringFormat="{TemplateBinding ContentStringFormat}" ContentTemplate="{TemplateBinding ContentTemplate}" RecognizesAccessKey="True" VerticalAlignment="Center" />
                            <Grid>
                                <Border x:Name="BackgroundBorder" BorderBrush="#FF939393" BorderThickness="1" CornerRadius="3" Height="27" Width="94">
                                    <Border.Background>
                                        <LinearGradientBrush StartPoint="0,0" EndPoint="0,1">
                                            <GradientStop Color="#FFB5B5B5" Offset="0" />
                                            <GradientStop Color="#FFDEDEDE" Offset="0.1" />
                                            <GradientStop Color="#FFEEEEEE" Offset="0.5" />
                                            <GradientStop Color="#FFFAFAFA" Offset="0.5" />
                                            <GradientStop Color="#FFFEFEFE" Offset="1" />
                                        </LinearGradientBrush>
                                    </Border.Background>
                                    <Grid>
                                        <Grid.ColumnDefinitions>
                                            <ColumnDefinition />
                                            <ColumnDefinition />
                                        </Grid.ColumnDefinitions>
                                        <Ellipse x:Name="Off" Width="14" Height="14" Stroke="#FF7A7A7A" StrokeThickness="2" Grid.Column="1" HorizontalAlignment="Center" VerticalAlignment="Center" />
                                        <Line x:Name="On" X1="0" Y1="0" X2="0" Y2="14" Stroke="#FF7A7A7A" StrokeThickness="2" Grid.Column="0" HorizontalAlignment="Center" VerticalAlignment="Center" />
                                    </Grid>
                                </Border>
                                <Border BorderBrush="#FF939393" HorizontalAlignment="Left" x:Name="slider" Width="41" Height="27" BorderThickness="1" CornerRadius="3" RenderTransformOrigin="0.5,0.5" Margin="0">
                                    <Border.RenderTransform>
                                        <TransformGroup>
                                            <ScaleTransform ScaleX="1" ScaleY="1" />
                                            <SkewTransform AngleX="0" AngleY="0" />
                                            <RotateTransform Angle="0" />
                                            <TranslateTransform X="0" Y="0" />
                                        </TransformGroup>
                                    </Border.RenderTransform>
                                    <Border.Background>
                                        <LinearGradientBrush EndPoint="0,1" StartPoint="0,0">
                                            <GradientStop Color="#FFF0F0F0" Offset="0" />
                                            <GradientStop Color="#FFCDCDCD" Offset="0.1" />
                                            <GradientStop Color="#FFFBFBFB" Offset="1" />
                                        </LinearGradientBrush>
                                    </Border.Background>
                                </Border>
                            </Grid>
                        </DockPanel>
                        <ControlTemplate.Triggers>
                            <Trigger Property="IsChecked" Value="True">
                                <Trigger.ExitActions>
                                    <BeginStoryboard Storyboard="{StaticResource OnUnchecking}" x:Name="OnUnchecking_BeginStoryboard" />
                                </Trigger.ExitActions>
                                <Trigger.EnterActions>
                                    <BeginStoryboard Storyboard="{StaticResource OnChecking}" x:Name="OnChecking_BeginStoryboard" />
                                </Trigger.EnterActions>
                                <Setter TargetName="On" Property="Stroke" Value="White" />
                                <Setter TargetName="Off" Property="Stroke" Value="White" />
                                <!-- Change Orange or Blue color here -->
                                <Setter TargetName="BackgroundBorder" Property="Background" Value="{StaticResource CheckedOrange}" />
                                <Setter TargetName="BackgroundBorder" Property="BorderBrush" Value="{StaticResource CheckedOrangeBorder}" />
                            </Trigger>
                            <Trigger Property="IsEnabled" Value="False">
                                <!-- ToDo: Add Style for Isenabled == False -->
                            </Trigger>
                        </ControlTemplate.Triggers>
                    </ControlTemplate>
                </Setter.Value>
            </Setter>
        </Style>
    </Control.Resources>
    <StackPanel  HorizontalAlignment="Center">
        <TextBlock Name="txbNomeSistema" HorizontalAlignment="Center" FontSize="25"/>
        <TextBlock FontSize="25"/>
        <StackPanel Orientation="Horizontal" HorizontalAlignment="Center">
            <Button	Name="btnApresentacao" Click="btnApresentacao_Click" Grid.Row="0" Grid.Column="0" Width="130"  Background="Transparent"
                BorderThickness="0"  Style="{StaticResource {x:Static ToolBar.ButtonStyleKey}}">
                <TextBlock	HorizontalAlignment="Center" TextAlignment="Center" ToolTip="Iniciar Apresentação" VerticalAlignment="Center">
						<Image Source="pack://application:,,,/image/presentation.png"/>
                </TextBlock>
            </Button>
            <Button	Name="btnConfiguracao" Click="btnConfiguracao_Click" Grid.Row="0" Grid.Column="1" Width="130"  Background="Transparent"
                BorderThickness="0" Style="{StaticResource {x:Static ToolBar.ButtonStyleKey}}">
                <TextBlock	HorizontalAlignment="Left" TextAlignment="Center" ToolTip="Configurações">
						<Image Source="pack://application:,,,/image/configuration.png"  />
                </TextBlock>
            </Button>
        </StackPanel>        
        
        <Grid Name="GridConfig" HorizontalAlignment="Left" VerticalAlignment="Top" Visibility="Hidden">
            <Grid.RowDefinitions>
                <RowDefinition x:Uid="0" Height="*" />
                <RowDefinition x:Uid="1" Height="*" />
                <RowDefinition x:Uid="2" Height="*" />
            </Grid.RowDefinitions>

            <Grid.ColumnDefinitions>
                <ColumnDefinition x:Uid="0" Width="*"/>
            </Grid.ColumnDefinitions>

            <StackPanel Orientation="Horizontal" Grid.Row="0" Grid.Column="0">
                <GroupBox Header="Pasta Principal" Width="600" FontSize="20">
                    <StackPanel Orientation="Horizontal">
                        <Button	Name="btnCaminhoColetania" Click="btnCaminhoColetania_Click" ToolTip="Selecione a pasta principal."
                    Width="48" Height="48" Background="Transparent" BorderThickness="0" Style="{StaticResource {x:Static ToolBar.ButtonStyleKey}}">
                            <Image Source= "pack://application:,,,/image/mini_folder.png" />
                        </Button>
                        <TextBox Name="tbCaminho" FontSize="18" Height="30" Background="Transparent" Foreground="LightGray" Width="530" />
                    </StackPanel>
                </GroupBox>
            </StackPanel>
            <StackPanel Orientation="Horizontal" Grid.Row="1" Grid.Column="0">
                <GroupBox Header="Estatísticas de Uso" Width="600" FontSize="20">
                    <StackPanel>
                        <StackPanel Orientation="Horizontal" VerticalAlignment="Center">
                            <Image Source= "pack://application:,,,/image/binoculars.png" />
                            <TextBlock Name="tbNumPessoaCapt" FontSize="18" VerticalAlignment="Center" Background="Transparent"  />
                            <TextBlock FontSize="18" Name="txbPessoasDetectadas"   VerticalAlignment="Center" Background="Transparent"  />
                        </StackPanel>
                        <StackPanel Orientation="Horizontal" >
                            <Image Source= "pack://application:,,,/image/user.png" />
                            <TextBlock Name="tbNumPessoaInter" FontSize="18" VerticalAlignment="Center" Background="Transparent"  />
                            <TextBlock FontSize="18" Name="txbPessoasIntegariram" VerticalAlignment="Center" Background="Transparent"  />
                        </StackPanel>
                        <StackPanel Orientation="Horizontal" HorizontalAlignment="Right" >
                            <Image Source= "pack://application:,,,/image/delete.png" />
                            <Button Name="btnReiniciar" Foreground="LightGray" Width="170" Height="26" Background="Transparent" BorderThickness="0" 
                            Style="{StaticResource {x:Static ToolBar.ButtonStyleKey}}" FontSize="15" VerticalAlignment="Center" Click="btnReiniciar_Click">
                                Limpar Estatísticas de Uso
                            </Button>
                        </StackPanel>
                    </StackPanel>
                </GroupBox>
            </StackPanel>
        </Grid>
    </StackPanel>
</Controls:GlassWindow>